﻿{{ define "blog/index.html"}}

{{template "blog/head.html" .}}

<body>

<!-- Start wrapper-->
<div id="wrapper">

{{template "blog/topbar.html" .}}

  <div class="clearfix"></div>
  <div class="content-wrapper" style="margin-left: 0px;">
    <div class="container-fluid">
      <!-- start main page -->
      <div class="card">
        <div class="card-body">
          <ul class="nav nav-tabs nav-tabs-primary">
            <li class="nav-item">
              <a class="nav-link active" href="/index.html"><i class="icon-home"></i>主页</a>
            </li>
            {{range $topblocktitle, $subblockinfos := .blockinfos}}
            <li class="nav-item dropdown">
              <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="javascript:void();"><i class="zmdi zmdi-book"></i>{{$topblocktitle}}</a>
              <div class="dropdown-menu">
              {{range $subblockinfos}}
                <a class="dropdown-item" href="/articlelist.html?blockid={{.Id}}">{{.Title}}</a>
              {{end}}
              </div>
            </li>
            {{end}}
            <li class="nav-item">
              <a class="nav-link" href="https://www.blacksea3.top/oj/"><i class="zmdi zmdi-edit"></i>判题系统</a>
            </li>
          </ul>
        </div>
      </div>
      <hr>

      <h2>文章</h2>
	    <div class="row">
        {{range .content}}
        <div class="col-12 col-lg-4 col-xl-4">
          <!--<div class="card border-0 gradient-esinto">-->
          <div class="card border-0">
            <div class="card-header border-light-2">
              <div class="row align-items-center">
                <div class="col text-left">
                  <h4 class="mb-0 text-black" style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">{{.Title}}</h4>
                  <h6 class="mb-0 text-black" style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">{{.ext_blockname}}</h6>
                  <h6 class="mb-0 text-black">{{.Edittime}}</h6>
                </div>
                <!--
                <div class="col text-right">
                  <i class="zmdi zmdi-more fa-2x text-black"></i>
                </div>
                -->
              </div>
            </div>
            <div class="card-body">
               <p class="text-black" style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">{{.Brief}}</p>
               <a href="/articledetail.html?id={{.Id}}" class="btn btn-sm btn-primary mt-3">阅读全文</a>
            </div>
          </div>
	      </div>
        {{end}}
      </div><!--end row-->

      <ul class="pagination">
        {{range .pageIndexs}}
          <li class="page-item {{if eq . $.prepage}}active{{end}}"><a class="page-link" href="/index.html?page={{.}}">{{.}}</a></li>
        {{end}}
      </ul>

	    <!--start overlay-->
        <div class="overlay toggle-menu"></div>
      <!--end overlay-->
    </div>
    <!-- End container-fluid-->

  </div><!--End content-wrapper-->
  <!--Start Back To Top Button-->
  <a href="javaScript:void();" class="back-to-top"><i class="fa fa-angle-double-up"></i> </a>
  <!--End Back To Top Button--> 

  {{template "blog/footer.html"}}
</div><!--End wrapper-->

  {{template "blog/tail.html"}} <!-- javascripts -->

</body>
</html>
{{ end }}
